{% load i18n %}
<!DOCTYPE html>
<html lang="en">
<head>
{% include 'header.html' %}
</head>
<body>
{% include 'nav.html' %}
<div id="resetpasswd">
<div class="content">
    {% if form.errors %}
            <div class="alert alert-danger">
            <p>请修改以下错误！</p>
        </div>
    {% endif %}
    <div>
    <form action="" method="post" class="form-horizontal">{% csrf_token %}
            <legend><span class="col-sm-offset-1">{% trans 'Password change' %}</span></legend>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10 text-info">
                    {% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}
                </div>
            </div>
            {% for field in form %}
                {% include 'registration/form_field.html' %}
            {% endfor %}
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                  <button type="submit" class="btn btn-default">{% trans 'Change my password' %}</button>
                  &nbsp;<button type="reset" class="btn">{% trans 'Cancel' %}</button>
                </div>
            </div>
        <script type="text/javascript">
            $(function(){
                $(".alert-message").alert();
                $('#mainForm').submit(function(){
                    $('#submit').button('loading');
                })
            });
            document.forms[0].elements[2].focus();
        </script>
    </form>
    </div>
</div>
</div>
</body>
</html>